/**
 * @file plugin-directive
   @author shenyc
 * @description 安装全局指令
 */
import type { App } from "vue";
import { directives } from "@/directives";

/**
 * 安装全局指令
 * 导出指令：v-name
 */
export const pluginDirective = {
    install: (app: App<Element>, ...options: unknown[]) => {
        // 注册所有自定义指令
        Object.keys(directives).forEach((key) => {
            app.directive(key, directives[key]);
        });
    },
};
